Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

deNetMsg.hpp

Go to the documentation of this file.
00001 ///////////////////////////////////////////////////////////////////////////////
00002 /// @file deNetMsg.hpp
00003 ///
00004 /// @brief 
00005 ///
00006 /// @author trajar
00007 ///
00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
00009 /// contents of this file is subject to the Destiny3D Member License which
00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
00011 ///
00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
00014 /// for any particular purpose.
00015 ///
00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
00017 ///
00018 /// <hr>
00019 ///                                 Change History
00020 /// <hr>
00021 ///
00022 /// @date Jun 2002
00023 /// @author trajar
00024 /// @remarks Creation
00025 ///
00026 ///////////////////////////////////////////////////////////////////////////////
00027 
00028 #ifndef     _DENETMSG_HPP
00029 #define     _DENETMSG_HPP
00030 
00031 #ifndef     _DENET_HPP
00032  #include   "deNet.hpp"
00033 #endif
00034 
00035 class dePacket;
00036 
00037 class DENET_API deNetMsg
00038 {
00039 public:
00040 
00041     deNetMsg(void);
00042     deNetMsg( dePacket * pPacket );
00043     virtual ~deNetMsg(void);
00044 
00045     enum eMsgID
00046     {
00047         MSG_INVALID_ID          = (WORD)(-1),
00048         // low level gets handled by deConnection object
00049         MSG_LOW_LEVEL           = 0,
00050         MSG_HANDSHAKE,
00051         MSG_DISCONNECT,
00052         MSG_PING,
00053         // high level gets handled by deNetUser object
00054         MSG_HIGH_LEVEL,
00055         MSG_SERVER_TIME,
00056         MSG_CONNECTION_REQUEST,
00057         MSG_CONNECTION_REPLY,
00058         MSG_CONNECTION_LOST,
00059         MSG_CUSTOM,
00060         MSG_MAX_ID
00061     };
00062 
00063     eNetError       Init( dePacket * pPacket );
00064     hNetUser        GetSender(void)         const       { return m_Sender; }
00065     hNetUser        GetRecip(void)          const       { return m_Recip; }
00066     WORD            GetMsgID(void)          const       { return m_iMsgID; }
00067     DWORD           GetDataSize(void)       const       { return m_DataSize; }
00068     void *          GetData(void)           const       { return m_Data; }
00069 
00070 private:
00071 
00072     hNetUser    m_Sender;
00073     hNetUser    m_Recip;
00074     WORD        m_iMsgID;
00075     DWORD       m_DataSize;
00076     BYTE *      m_Data;
00077 
00078 public:
00079 
00080     deNetMsg& operator = ( const deNetMsg& r );
00081 };
00082 
00083 #endif

Generated on Mon Sep 12 19:58:32 2005 for Destiny3D by doxygen1.3-rc3